package cate.common.table.res.farm.sheet;

import cate.common.table.ESheet;
import cate.common.table.res.farm.row.FarmGroundRow;

public class FarmGroundSheet extends ESheet<FarmGroundRow> {
    @Override
    public String getSheetName() {
        return "农场土地";
    }

    public FarmGroundRow getLevelRow(int level) {
        return getList().stream().filter(e -> e.level == level).findAny().orElse(null);
    }

    public FarmGroundRow getNextLevelRow(int level) {
        return getList().stream().filter(e -> e.level == level + 1).findAny().orElse(null);
    }
}
